from django import forms
from .models import *
from userprofile.models import BusinessInfo

class BusinessChangeForm(forms.ModelForm):
    class Meta:
        model = BusinessInfo
        fields = ('account', 'phone', 'province',
                  'city', 'area', 'address')

class BusinessChangeImgForm(forms.ModelForm):
    class Meta:
        model = BusinessInfo
        fields = ('imgSrc',)

class GoodsChangeForm(forms.ModelForm):
    class Meta:
        model = Goods
        fields = ('goodsTitle', 'goodsPrice', 'description', 'id')


class GoodsAddForm(forms.ModelForm):
    class Meta:
        model = Goods
        fields = ('goodsTitle', 'goodsPrice', 'goodsSrc', 'uploadUser', 'description')

class CommentsAddForm(forms.ModelForm):
    class Meta:
        model = Comments
        fields = ('goods', 'user', 'body')

class ContactAddForm(forms.ModelForm):
    class Meta:
        model = Contact
        fields = ('goods', 'user', 'businessuser', 'cphone')
